#include<bits/stdc++.h>

using namespace std;
using ll = long long;
#define endl '\n'

template<typename T=int>
inline T read() {
    T x;
    cin >> x;
    return x;
}

#define REP(i, x, y) for (decay<decltype(y)>::type i = (x), _##i = (y); i < _##i; ++i)
#define PER(i, x, y) for (decay<decltype(x)>::type i = (x), _##i = (y); i > _##i; --i)


int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int m;
    cin >> m;
    while (m--) {
        int n;
        cin >> n;
        vector<double> a(n);
        REP(i, 0, n)cin >> a[i];
        sort(a.begin(), a.end(), greater<double>());
        double sum = 0, cnt = 0;
        REP(i, 0, n) {
            if (a[i] >= 1 && sum < 20) {
                sum += 2 * sqrt(a[i] * a[i] - 1);
                cnt++;
            }
        }
        cout << cnt << endl;
    }

    return 0;
}
